package cn.com.czpb.client.custorm;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;

public class MyRecyclerView extends RecyclerView {

	public MyRecyclerView(Context context, AttributeSet attrs,
                          int defStyleAttr) {
		super(context, attrs, defStyleAttr);
	}

	public MyRecyclerView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public MyRecyclerView(Context context) {
		super(context);
	}
	
	@Override
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2,
		        MeasureSpec.AT_MOST);
//		ListAdapter adapter=getAdapter();
//		if(null!=adapter){
//			int dividerH=adapter.getCount()*getDividerHeight();
//			if(dividerH>0){
//				expandSpec+=dividerH;
//			}
//		}
//		super.onMeasure(widthMeasureSpec, heightMeasureSpec);
//		LogUtils.i("expandSpec--->"+heightMeasureSpec);
//		LogUtils.i("expandSpec--->"+expandSpec);
		super.onMeasure(widthMeasureSpec, expandSpec);
	}
	
	
	
	
}
